<?php
	
	class View{
		
		var $page;
		
		
		function View($page){
			global $WIKIPEDIA, $WIKINEWS, $WIKTIONNARY, $ACCUEIL, $PARAMS, $ERREUR;
			global $includePage;
			
			$this->page = $page;
			
			switch($this->page){
			
				case $WIKIPEDIA:
					$includePage['content'] = 'wikipedia/wikipedia.php';
					$includePage['nav1'] = 'form_recherche.php';
					$includePage['nav2'] = 'menu.php';
					$includePage['footer'] = 'footer.php';
					break;
				case $WIKTIONNARY:
					$includePage['content'] = 'wiktionnary/wiktionnary.php';
					$includePage['nav1'] = 'form_recherche.php';
					$includePage['nav2'] = 'menu.php';
					$includePage['footer'] = 'footer.php';
					break;
				case $WIKINEWS:
					$includePage['content'] = 'wikinews/wikinews.php';
					$includePage['nav1'] = 'form_recherche.php';
					$includePage['nav2'] = 'menu.php';
					$includePage['footer'] = 'footer.php';
					break;
				case $ACCUEIL:
					$includePage['content'] = 'accueil.php';
					$includePage['nav1'] = 'form_recherche.php';
					$includePage['nav2'] = 'menu.php';
					$includePage['footer'] = 'footer.php';
					break;
				case $PARAMS: 
					$includePage['content'] = 'parametrage.php';
					break;
				default:
					$includePage['content'] = 'erreur.php';
					$includePage['nav1'] = 'form_recherche.php';
					$includePage['nav2'] = 'menu.php';
					$includePage['footer'] = 'footer.php';
				break;
			}
		}
	
		function render(){
			include_once('view/index.php');
		}
	
		function display_table($elem){
			
			//foreach (
			
		}
	
	}
	

?>